// import Mock from 'mockjs'
const Mock = require('mockjs')
const axios = require('axios')
import { city } from './city'
console.log(city, 'city')
let data = Mock.mock({
  "list|15": [
    {
      "id": "@id",
      "city": "@city",
      "img": "@image(200x100, @color, @city)",
      "num": "@integer(100, 1000)"
    }
  ],
  "floor": city
  // "floorList|2": [
  //   {
  //     "id": "@id",
  //     "city": "A@city",
  //   }
  // ]
})
// mock延时获取数据
// Mock.setup({
//   timeout: 3000
// })
// 解决异步 promise async await

Mock.mock('/api/list', () => {
  return {
    code: 0,
    msg: 'success',
    data: data.list,
    city: data.floor
  }
})

console.log("mock:", data)



